﻿namespace Lr.Templating
{
    /// <summary>
    /// Defines a factory responsible for creating <see cref="ITemplate"/>s.
    /// </summary>
    public static class TemplateFactory
    {
        /// <summary>
        /// Initializes the building of a new <see cref="ITemplate"/>.
        /// </summary>
        /// <returns>A <see cref="TemplateBuilder"/> object, to further configure the <see cref="ITemplate"/>.</returns>
        public static TemplateBuilder<NonGenericTemplate> New()
        {
            return new TemplateBuilder<NonGenericTemplate>();
        }

        /// <summary>
        /// Initializes the building of a new <see cref="ITemplate"/>.
        /// </summary>
        /// <typeparam name="TObject">The type of the object that will be taken into account when calculating a placeholder's value.</typeparam>
        /// <returns>A <see cref="TemplateBuilder"/> object, to further configure the <see cref="ITemplate"/>.</returns>
        public static TemplateBuilder<GenericTemplate<TObject>> New<TObject>()
        {
            return new TemplateBuilder<GenericTemplate<TObject>>();
        }
    }
}
